package rsj.util;

public class PageQuery {

    private static final int PAGE_COUNT = 20;
    private long Page_Count;
    private int Page_Size;
    private long offset;
    private long limit;

    public long getPage_Count() {
        if(Page_Count <= 0){
            Page_Count = 1;
        }
        return Page_Count;
    }

    public void setPage_Count(long page_Count) {
        Page_Count = page_Count;
    }

    public int getPage_Size() {
        if( Page_Size <= 0){
            Page_Size = PAGE_COUNT;
        }
        return Page_Size;
    }

    public void setPage_Size(int page_Size) {
        Page_Size = page_Size;
    }

    public long getOffset() {
        return (getPage_Count() - 1) * getPage_Size();
    }

    public long getLimit() {
        return getPage_Size();
    }
}
